<template>
	<view class="footer-component">
		<view class="footer flex-c-sb">
			<view class="pre" v-show="stepNum != 0" @click="nextBtn(0)">上一步</view>
			<view :class=" (stepNum == 0) ? 'next-all' : 'next' " @click="nextBtn(1)">{{stepNum == 2? '提交' :'下一步'}}</view>
		</view>
	</view>
</template>

<script>
	export default{
		name:'footerComponent',
		props:['stepNum'],
		emits:['nextBtn'],
		methods:{
			nextBtn(k){
				this.$emit('nextBtn',k)
			}
		}
	}
</script>

<style lang="scss">
	.footer-component{
		width: 100%;
		height: 100%;
		.footer{
			width: 100%;
			box-sizing: border-box;
			padding: 20upx ;
		}
		.next-all{
			margin: 0 auto;
			width: 100%;
			height: 60upx;
			text-align: center;
			line-height: 60upx;
			border-radius: 40upx;
			background-color: #ff2658;
			color: #fff;
		}
		.next,.pre{
			width: 48%;
			height: 60upx;
			text-align: center;
			line-height: 60upx;
			border-radius: 40upx;
			background-color: #ff2658;
			color: #fff;
		}
	}
</style>
